CREATE TABLE [dbo].[TDRENO_PROV]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[CO_PROV] [dbo].[TD_VC_020] NOT NULL,
[NU_RENO] [dbo].[TD_VC_008] NOT NULL,
[FE_RENO] [dbo].[TD_DT_001] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDRENO_PR__NU_SE__697C9932] DEFAULT ((0)),
[NU_ORDE_LETR] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TDRENO_PR__NU_OR__6A70BD6B] DEFAULT ((0)),
[NU_LETR_PROV] [dbo].[TD_VC_020] NULL,
[CO_TIPO_DOCU] [dbo].[TD_VC_003] NULL,
[NU_DOCU_PROV] [dbo].[TD_VC_020] NULL,
[IM_DOCU] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDRENO_PR__IM_DO__6B64E1A4] DEFAULT ((0)),
[IM_SALD_DOCU] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDRENO_PR__IM_SA__6C5905DD] DEFAULT ((0)),
[IM_SALD_CONV] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDRENO_PR__IM_SA__6D4D2A16] DEFAULT ((0)),
[IM_DETA] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDRENO_PR__IM_DE__6E414E4F] DEFAULT ((0)),
[IM_DETA_NEGA] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDRENO_PR__IM_DE__6F357288] DEFAULT ((0)),
[IM_CONV_DOCU] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDRENO_PR__IM_CO__702996C1] DEFAULT ((0)),
[ST_CIER_DOCU] [dbo].[TD_VC_001_SINO] NOT NULL CONSTRAINT [DF__TDRENO_PR__ST_CI__711DBAFA] DEFAULT ('N'),
[IM_RENO_MDOC] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDRENO_PR__IM_RE__7306036C] DEFAULT ((0)),
[IM_RENO_MREN] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDRENO_PR__IM_RE__73FA27A5] DEFAULT ((0)),
[CO_ESTA_ORIG] [dbo].[TD_VC_003] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDRENO_PR__CO_US__74EE4BDE] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDRENO_PR__FE_US__75E27017] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDRENO_PR__CO_US__76D69450] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDRENO_PR__FE_US__77CAB889] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDRENO_PROV] WITH NOCHECK ADD CONSTRAINT [CK__TDRENO_PR__ST_CI__7211DF33] CHECK NOT FOR REPLICATION (([ST_CIER_DOCU]='N' OR [ST_CIER_DOCU]='S'))
GO
ALTER TABLE [dbo].[TDRENO_PROV] ADD CONSTRAINT [PK__TDRENO_P__A7C0DD7221EBDADE] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_UNID_CONC], [CO_PROV], [NU_RENO], [FE_RENO], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDRENO_PROV] ADD CONSTRAINT [FK__TDRENO_PROV__6C6EDFCD] FOREIGN KEY ([CO_EMPR], [CO_UNID_CONC], [CO_PROV], [NU_RENO], [FE_RENO]) REFERENCES [dbo].[TCRENO_PROV] ([CO_EMPR], [CO_UNID_CONC], [CO_PROV], [NU_RENO], [FE_RENO])
GO
